package com.example.videoserver.utli;

import lombok.Data;
import lombok.Getter;

@Getter
@Data
public class ResponseRest {
    private Integer status;
    private String msg;
    private Object Data;

    public  static ResponseRest success(){
        ResponseRest responseRest = new ResponseRest();
        responseRest.setMsg("success");
        responseRest.setStatus(200);
        return responseRest;
    }

    public  static ResponseRest success(Object data){
        ResponseRest responseRest = new ResponseRest();
        responseRest.setMsg("success");
        responseRest.setStatus(200);
        responseRest.setData(data);
        return responseRest;
    }


    public  static ResponseRest fail(){
        ResponseRest responseRest = new ResponseRest();
        responseRest.setMsg("success");
        responseRest.setStatus(400);
        return responseRest;
    }
}
